clear all;close all;clc
fs = 32.1e3; % this is the one for the 3D3A database
for igroup = 1:8 % 8 groups will make 200 sentences
    igroup
    target = [];
    noise = [];
    randNoise = randperm(25);
    for isent = 1:25
        if isent<10
            [ori,fs2]=audioread(['Speech_sound\BEL_SR\BEL_SR0' num2str(igroup) '0' num2str(isent) '.wav']);
        else
            [ori,fs2]=audioread(['Speech_sound\BEL_SR\BEL_SR0' num2str(igroup) num2str(isent) '.wav']);
        end
        target = [target;resample(ori,fs,fs2)];

    end
    [b a]=butter(3,4000./(fs/2));
    Ftar = filter(b,a,target);
    energyG(igroup) = sum(Ftar.^2)./sum(target.^2)
end
min(energyG)
max(energyG)